//
// Created by Xiezongxi on 2025/7/1.
//

#ifndef YUNQIUSAI_H
#define YUNQIUSAI_H

/*重装球的绝对坐标*/
#define TRY_AGAIN_POINT_X 0.2f
#define TRY_AGAIN_POINT_Y -0.2f

/*运球赛起点相较于码盘复位原点的坐标*/
// #define START_POINT_X 0.3f
// #define START_POINT_Y 0.3f
#define START_POINT_X (2.50 - 0.315)
#define START_POINT_Y (2.75 - 0.315)

/*运球赛起点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_0_X 0.0f
#define DRIBBLE_GAME_POINT_0_Y 0.0f

/*运球赛第一个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_1_X 1.13107f * sqrt(0.5f)
#define DRIBBLE_GAME_POINT_1_Y -1.13107f * sqrt(0.5f)

/*运球赛第二个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_2_X DRIBBLE_GAME_POINT_1_X + 1.69979f
#define DRIBBLE_GAME_POINT_2_Y DRIBBLE_GAME_POINT_1_Y

/*运球赛第三个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_3_X DRIBBLE_GAME_POINT_2_X
#define DRIBBLE_GAME_POINT_3_Y DRIBBLE_GAME_POINT_2_Y + 2.05021f

/*运球赛第四个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_4_X DRIBBLE_GAME_POINT_3_X
#define DRIBBLE_GAME_POINT_4_Y DRIBBLE_GAME_POINT_3_Y + 2.05021f

/*运球赛第五个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_5_X DRIBBLE_GAME_POINT_3_X
#define DRIBBLE_GAME_POINT_5_Y DRIBBLE_GAME_POINT_3_Y + 2.05021f

/*运球赛第六个点相对于起点坐标*/
#define DRIBBLE_GAME_POINT_6_X DRIBBLE_GAME_POINT_5_X - 1.13107f * sqrt(0.5f)
#define DRIBBLE_GAME_POINT_6_Y DRIBBLE_GAME_POINT_5_X - 1.13107f * sqrt(0.5f)
/**
 * @brief 运球赛实例
 */
typedef enum
{
    POINT_1 = 1,
    POINT_2,
    POINT_3,
    POINT_4,
    POINT_5,
    POINT_6,
    POINT_7,
    POINT_DUIKANGSAI,
    POINT_DRIBBLE_TEST,
    POINT_STRAT_YUNQIUSAI = 21,
    POINT_STOP = 31,
} YunqiuSai_Command_t;

/**
 * @brief 暑假第二周运球赛实例
 */
typedef enum
{
    AUTO = 1, //开始全自动走完整个流程
    TRY_AGAIN,//重试(回去重新装球
    GO_BACK,  //回到落球的那个起点重新开始
    PREPARE,  //准备工作
    CIRCLE,   //再来一次
    STOP,     //停止
} DribbleGame_Command_t;

#endif //YUNQIUSAI_H
